body {
    font-family: 'Arial', sans-serif;
    background-color: #1a1a2e; /* Dark background */
    color: #e0e0e0; /* Light text */
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    min-height: 100vh;
    margin: 0;
    padding: 20px 0; /* Add padding to top/bottom for taller content */
    text-align: center;
    box-sizing: border-box;
}

.container {
    background-color: #16213e; /* Slightly lighter dark background for container */
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    width: 90%;
    border: 2px solid #0f3460;
    margin: 20px; /* Added margin for smaller screens */
}

h1 {
    color: #e94560; /* A vibrant red/pink for headings */
    font-size: 2.8em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

h2 {
    color: #533483; /* A deep purple */
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 15px;
}

p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 10px;
}

.highlight {
    color: #00bcd4; /* Cyan/Teal to highlight @Basically_Games */
    font-weight: bold;
}

#countdown {
    font-size: 2.5em;
    font-weight: bold;
    color: #00bcd4; /* Cyan/Teal for countdown */
    margin: 30px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 15px;
}

#countdown span {
    background-color: #0f3460;
    padding: 10px 15px;
    border-radius: 8px;
    min-width: 70px;
    display: inline-block;
}

#winner-display {
    background-color: #0f3460;
    border: 1px dashed #e94560;
    padding: 20px;
    margin-top: 30px;
    border-radius: 10px;
}

#winner-display p {
    font-size: 1.2em;
    color: #e0e0e0;
}

.call-to-action {
    margin-top: 40px;
}

.btn {
    display: inline-block;
    background-color: #e94560;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2em;
    margin-top: 20px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    background-color: #c0392b;
    transform: translateY(-3px);
}

/* New styles for multiplayer section */
#multiplayer-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #0f3460;
    text-align: left;
}

#multiplayer-section h2 {
    text-align: center;
    margin-bottom: 25px;
}

#peer-list {
    background-color: #0f3460;
    padding: 20px;
    border-radius: 10px;
    min-height: 50px;
    display: flex; /* Use flexbox for horizontal layout */
    justify-content: center; /* Center items */
    flex-wrap: wrap; /* Allow items to wrap to next line */
    gap: 15px; /* Spacing between peer items */
}

.peer-avatars {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.peer-item {
    display: flex;
    flex-direction: column; /* Stack avatar and username vertically */
    align-items: center;
    gap: 5px;
    color: #e0e0e0;
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
    width: 80px; /* Fixed width for consistent display */
}

.peer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #00bcd4; /* Accent color for avatar border */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.peer-item.self .peer-avatar {
    border-color: #e94560; /* Highlight own avatar */
}

/* New styles for comment section */
#comment-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #0f3460;
    text-align: left;
}

#comment-section h2 {
    text-align: center;
    margin-bottom: 25px;
}

.comment-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.comment-controls .btn {
    margin-top: 0;
    padding: 10px 20px;
    font-size: 1em;
    background-color: #533483; /* Purple for comment buttons */
}

.comment-controls .btn:hover {
    background-color: #402964;
    transform: translateY(-2px);
}

#comment-list {
    background-color: #0f3460;
    padding: 20px;
    border-radius: 10px;
    min-height: 100px;
    position: relative; /* For loading indicator positioning */
}

.comment-card {
    background-color: #16213e;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #00bcd4;
}

.comment-author {
    font-weight: bold;
    color: #00bcd4;
}

.comment-timestamp {
    font-size: 0.8em;
    color: #a0a0a0;
    margin-left: auto;
}

.comment-content {
    color: #e0e0e0;
    line-height: 1.5;
    word-wrap: break-word; /* Ensure long words break */
}

.comment-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-top: 10px;
    display: block;
    max-height: 300px; /* Limit image height */
    object-fit: contain;
}

.comment-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.comment-footer button {
    background-color: #e94560;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.9em;
}

.comment-footer button:hover {
    background-color: #c0392b;
}

.tip-amount {
    background-color: #00bcd4;
    color: #16213e;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.85em;
    margin-right: auto; /* Pushes other buttons to the right */
    display: flex;
    align-items: center;
    gap: 5px;
}

.tip-amount::before {
    content: '💰'; /* Emoji for money/tip */
    font-size: 1.2em;
}

.replies-container {
    margin-left: 20px;
    border-left: 2px solid #533483;
    padding-left: 10px;
    margin-top: 15px;
}

.replies-container .comment-card {
    margin-top: 10px;
    margin-bottom: 0;
    background-color: #0f3460; /* Slightly different background for replies */
}

#pagination-controls {
    text-align: center;
    margin-top: 20px;
}

#pagination-controls .btn {
    background-color: #00bcd4;
    color: white;
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
    margin-top: 0; /* Override default button margin */
}

#pagination-controls .btn:hover {
    background-color: #009aa7;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.5em;
    }

    p {
        font-size: 1em;
    }

    #countdown {
        font-size: 1.8em;
        gap: 10px;
    }

    #countdown span {
        min-width: 60px;
        padding: 8px 12px;
    }

    .btn {
        padding: 12px 25px;
        font-size: 1em;
    }

    /* Responsive adjustments for comments */
    #comment-list {
        padding: 10px;
    }

    .comment-card {
        padding: 10px;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-avatar {
        width: 35px;
        height: 35px;
    }

    .comment-timestamp {
        margin-left: 0;
        margin-top: 5px;
    }

    .comment-footer {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 5px;
    }

    .comment-footer button, .tip-amount {
        font-size: 0.8em;
        padding: 6px 10px;
    }
}